package com.snap.vseries.bean;

import org.litepal.crud.LitePalSupport;

import java.io.Serializable;

import io.protostuff.Tag;

/**
 * 存储在数据库中的实验摘要信息
 */
public class ExpEntity extends LitePalSupport implements Serializable {
    private boolean isTemplate;
    private String testProject;//检测项目，模板独有，即isTemplate==true时才有
    private String name;//实验名
    private long startTime;//实验开始时间
    private long endTime;//实验结束时间
    private String description;//模板的附加简要说明
    private String deviceTag;

    public String getDeviceTag() {
        return deviceTag;
    }

    public void setDeviceTag(String deviceTag) {
        this.deviceTag = deviceTag;
    }

    /**
     * 排序字段
     */
    private int sortId;
    /**
     * 是否已读
     */
    private boolean isRead;

    public int getSortId() {
        return sortId;
    }

    public void setSortId(int sortId) {
        this.sortId = sortId;
    }

    public ExpEntity() {
    }

    public boolean isRead() {
        return isRead;
    }

    public void setRead(boolean read) {
        isRead = read;
        if (!read) {
            this.setToDefault("isRead");
        }
    }

    public ExpEntity(String testProject, String description) {
        this.testProject = testProject;
        this.description = description;
    }

    public String getTestProject() {
        return testProject;
    }

    public void setTestProject(String testProject) {
        this.testProject = testProject;
    }

    public boolean isTemplate() {
        return isTemplate;
    }

    public void setTemplate(boolean template) {
        isTemplate = template;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
